/*
 * FrameFilter.h
 *
 *  Created on: 2016年1月1日
 *      Author: terry
 */

#ifndef FRAMEFILTER_H_
#define FRAMEFILTER_H_

#include "MediaFormat.h"
#include "Ffmpeg.h"
#include <string>


namespace av
{


class FrameFilter
{
public:
	virtual ~FrameFilter() {}

	virtual int filter(AVFrame* inFrame, AVFrame* outFrame) =0;

	virtual int open(const std::string& filters) =0;

	virtual void close() =0;

	virtual bool isOpen() =0;

	virtual int getMediaType() =0;

};


class VideoFrameFilter : public FrameFilter
{
public:
	virtual ~VideoFrameFilter() {}

	virtual int getMediaType()
	{
		return AVMEDIA_TYPE_VIDEO;
	}
};


class AudioFrameFilter : public FrameFilter
{
public:
	virtual ~AudioFrameFilter() {}

	virtual int getMediaType()
	{
		return AVMEDIA_TYPE_AUDIO;
	}

};



}


#endif /* FRAMEFILTER_H_ */
